/*
 * @Description: 
 * @Author: @yangwenshan
 * @since: 2021-05-17 08:54:48
 * @LastAuthor: @yangwenshan
 * @lastTime: 2021-05-19 09:55:04
 */
import request from '@/utils/request'

const api = {
    list: '/type/',
}

//获取题目类别列表
export function getTypeList(params) {
    return request({
        url: api.list,
        method: 'get',
        params
    })
}

//新增类别
export function addType(data) {
    return request({ url: api.list, method: 'post', data })
}

//删除类别
export function deleteType(id) {
    return request({ url: `${api.list}${id}/`, method: 'delete' })
}

//修改类别
export function updateType(id,data) {
    return request({ url: `${api.list}${id}/`, method: 'patch', data })
}

